<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class ClassStudent extends Model
{
    public function time()
    {
        return $this->hasOne(ClassTime::class,'id','classtime_id')->bind(['time_id'=>'id','classroom_id','course_id','start_time','end_time','admin_id','date','time1']);
    }

    public function student()
    {
        return $this->hasOne(Student::class,'id','student_id')->field('id,sex,mobile,birthday,education,name');
    }
}
